Skip to main content
Version: 11.0

APIs for Hidden Devices

POST /api/v2/devices/purged

Description

Get a list of all hidden devices.

Header Parameters

NameDescriptionTypeRequiredDefault
AuthorizationBearer API token/key. The format is Bearer <API_key>StringYes
orgIdThe ID of the organization. The format is OrgId:OrgNameStringYes
siteIdThe ID of the site. The format is SiteId:SiteNameStringYes

Query Parameters

NameDescriptionTypeRequiredDefault
pagePage number, starting from 1StringNo1
sizeNumber of devices per page. Minimum size is 1StringNo10
sortSorting criteria in the format: property, (asc,desc). Multiple sort criteria are supportedStringNo
showBillableFlag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devicesBooleanNofalse

CURL Example

The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID> & <API-TOKEN> are variables.

curl --location --request POST 'https://<NCE-IP>/api/v2/devices/purged?page=1&size=25&sort=lastUpdateTime%2CDESC&showBillable=false' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'

Response

Upon a successful request, the API returns Status code 200. The response model is the same as the response for ::title section.

PUT /api/v2/devices/purge

Description

Hide a device

Header Parameters

NameDescriptionTypeRequiredDefault
AuthorizationBearer API token/key. The format is Bearer <API_key>StringYes
orgIdThe ID of the organization. The format is OrgId:OrgNameStringYes
siteIdThe ID of the site. The format is SiteId:SiteNameStringYes

Body Parameters

NameDescriptionTypeRequiredDefault
deviceIdListPostDataFilter with the device IDs. The format is JSON. Example {"deviceIds": ["<deviceID"]}ObjectYes

CURL Example

The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID>, <API-TOKEN> & <DEVICE-ID> are variables.

curl --location --request PUT 'https://<NCE-IP>/api/v2/devices/purge' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API-TOKEN>' \
--data '{
"deviceIds": [
"<DEVICE-ID>"
]
}'

Response

Upon a successful request, the API returns Status code 204 No Content.

PUT /api/v2/devices/unpurge

Description

Unhide a device

Header Parameters

NameDescriptionTypeRequiredDefault
AuthorizationBearer API token/key. The format is Bearer <API_key>StringYes
orgIdThe ID of the organization. The format is OrgId:OrgNameStringYes
siteIdThe ID of the site. The format is SiteId:SiteNameStringYes

Body Parameters

NameDescriptionTypeRequiredDefault
deviceIdListPostDataFilter with the device IDs. The format is JSON. Example {"deviceIds": ["<deviceID"]}ObjectYes

CURL Example

The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID>, <API-TOKEN> & <DEVICE-ID> are variables.

curl --location --request PUT 'https://<NCE-IP>/api/v2/devices/unpurge' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API-TOKEN>' \
--data '{
"deviceIds": [
"<DEVICE-ID>"
]
}'

Response

Upon a successful request, the API returns Status code 200 OK.